#-*-coding=utf-8-*-
import os
import mysql.connector
from datetime import timedelta

class Config(object):
	"""基础设置"""
	HOST = "127.0.0.1"
	PORT = 5000
	"""环境设置"""
	APPLICATION_ROOT = "/"
	BASE_DIR = os.getcwd()
	TEMPLATE_FOLDER = os.path.join(BASE_DIR, "templates")
	STATIC_FOLDER = os.path.join(BASE_DIR, "static")
	"""数据库设置"""
	SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://ssgll:383687@127.0.0.1:3306/CeaserBlog?charset=utf8"
	SQLALCHEMY_ECHO = False
	SQLALCHEMY_TRACK_MODIFICATIONS = False
	"""session设置"""
	PERMENENT_SESSION_LEFTTIME = timedelta(days=1)
	SECRET_KEY = "ZPnBmkiTz^OYulfPzQcHwVcxHqWHK3Wz"


class Development(Config):
	pass


class Everoiment(Config):
	pass


config = {
	"Config": Config,
	"Development": Development,
	"Everoiment": Everoiment,
	"Default": Config,
}